package com.lhd.creational.singleton.demo06;

/**
 * @Author: liuhd
 * @Date: 2024/10/19 17:30
 * @Description: 静态内部类单例
 */
public class Singleton {
    private Singleton() {
    }

    private static class SingletonHolder {
        private static final Singleton SINGLETON = new Singleton();
    }

    public static Singleton getInstance() {
        return SingletonHolder.SINGLETON;
    }
}
